package com.hotec.PROJECT_NAME.component.task;

import com.hotec.PROJECT_NAME.modules.cmd.CommandExecutor;
import com.hotec.PROJECT_NAME.modules.cmd.instance.TestCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class DemoTask {

    @Autowired
    private CommandExecutor commandExecutor;

    /**
     * 测试
     */
    @Scheduled(fixedDelay = 60 * 1000, initialDelay = 10 * 1000)
    public void handleUploadBalance (){
        String result = commandExecutor.execute(new TestCommand("这是测试参数"));

        System.out.println(result);
    }
}
